package br.com.rampage.utils;

import java.util.HashMap;

public class ConnectionUsersUtil {
	
	public static HashMap<String, Object> users = new HashMap<String, Object>();
	
	public static Object getUserFromSessionId(String sessionId) {
		return users.get(sessionId);
	}
	
	public static void setUserOfSessionId(String sessionId, Object user) {
		users.put(sessionId, user);
	}
	
	public static void removeUserSession(String sessionId) {
		users.remove(sessionId);
	}
	
	public static boolean hasSessionWithId(String sessionId) {
		return users.containsKey(sessionId);
	}
}
